<script>
function change_bg(position) {
	document.getElementById( position+"_bgImg" ).style.display='none';
	document.getElementById( position+"_bgCol" ).style.display='none';
	document.getElementById( position+"_bgGra1" ).style.display='none';
	document.getElementById( position+"_bgGra2" ).style.display='none';
	
	if(document.getElementById( position+"_bg_img").checked) {
		document.getElementById( position+"_bgImg" ).style.display='block';
	}
	if(document.getElementById( position+"_bg_col").checked) {
		document.getElementById( position+"_bgCol" ).style.display='block';
	}
	if(document.getElementById( position+"_bg_gra").checked) {
		document.getElementById( position+"_bgGra1" ).style.display='block';
		document.getElementById( position+"_bgGra2" ).style.display='block';
	}
}
</script>

<div id="page_list">
    <h2>Add new Project</h2>
    <div><a class="addnew" href="<?php echo base_url();?>administrator/project/index">+ Back</a></div>
    <form method="post" name="editForm">
        <div class="form">
            <span class="relative">
                <label>Username</label>
                <select class="selectbox" name="user_id">
                    <option value="1">admin1</option>
                    <option value="2">guest1</option>
                </select>
            </span>
			
            <div class="separator"></div>
			<span class="relative">
				<label>Background</label>
				<input type="radio" name="TB_bg" id="TB_bg_img" style="float:left" checked onchange="change_bg('TB');">
				<label for="TB_bg_img" style="width:inherit">Image</label>
				<input type="radio" name="TB_bg" id="TB_bg_col" style="float:left" onchange="change_bg('TB');">
				<label for="TB_bg_col" style="width:inherit">Color</label>
				<input type="radio" name="TB_bg" id="TB_bg_gra" style="float:left" onchange="change_bg('TB');">
				<label for="TB_bg_gra" style="width:inherit">Gradient</label>
			</span>
            <span class="relative" id="TB_bgImg">
                <label>Background image</label>
                <input type="text" class="inputbox" name="TB_bckImg" value="<?php echo htmlspecialchars($data['TB_bckImg']);?>"/>
            </span>
            <span class="relative" id="TB_bgCol" style="display:none">
                <label>Background color</label>
                <input type="text" class="inputbox" name="TB_bckCol" value="<?php echo htmlspecialchars($data['TB_bckCol']);?>"/>
            </span>
            <span class="relative" id="TB_bgGra1" style="display:none">
                <label>Gradient color 1</label>
                <input type="text" class="inputbox" name="TB_bckGrad1" value="<?php echo htmlspecialchars($data['TB_bckGrad1']);?>"/>
            </span>
            <span class="relative" id="TB_bgGra2" style="display:none">
                <label>Gradient color 2</label>
                <input type="text" class="inputbox" name="TB_bckGrad2" value="<?php echo htmlspecialchars($data['TB_bckGrad2']);?>"/>
            </span>
			<span class="relative">
                <label>Logo image</label>
                <input type="text" class="inputbox" name="TB_logoImg" value="<?php echo htmlspecialchars($data['TB_logoImg']);?>"/>
            </span>
			<span class="relative">
                <label>Logo text</label>
                <input type="text" class="inputbox" name="TB_logotext" value="<?php echo htmlspecialchars($data['TB_logotext']);?>"/>
            </span>
			<span class="relative">
                <label>Logo align</label>
                <input type="text" class="inputbox" name="TB_logo_align" value="<?php echo htmlspecialchars($data['TB_logo_align']);?>"/>
            </span>
			<span class="relative">
                <label>Top shadow</label>
                <input type="text" class="inputbox" name="TB_shadow" value="<?php echo htmlspecialchars($data['TB_shadow']);?>"/>
            </span>
			
			<div class="separator"></div>
			<span class="relative">
				<label>Background</label>
				<input type="radio" name="M_bg" id="M_bg_img" style="float:left" checked onchange="change_bg('M');">
				<label for="M_bg_img" style="width:inherit">Image</label>
				<input type="radio" name="M_bg" id="M_bg_col" style="float:left" onchange="change_bg('M');">
				<label for="M_bg_col" style="width:inherit">Color</label>
				<input type="radio" name="M_bg" id="M_bg_gra" style="float:left" onchange="change_bg('M');">
				<label for="M_bg_gra" style="width:inherit">Gradient</label>
			</span>
			<span class="relative" id="M_bgImg">
                <label>Background image</label>
                <input type="text" class="inputbox" name="M_bckImg" value="<?php echo htmlspecialchars($data['M_bckImg']);?>"/>
            </span>
            <span class="relative" id="M_bgCol" style="display:none">
                <label>Background color</label>
                <input type="text" class="inputbox" name="M_bckCol" value="<?php echo htmlspecialchars($data['M_bckCol']);?>"/>
            </span>
            <span class="relative" id="M_bgGra1" style="display:none">
                <label>Gradient color 1</label>
                <input type="text" class="inputbox" name="M_bckGrad1" value="<?php echo htmlspecialchars($data['M_bckGrad1']);?>"/>
            </span>
            <span class="relative" id="M_bgGra2" style="display:none">
                <label>Gradient color 2</label>
                <input type="text" class="inputbox" name="M_bckGrad2" value="<?php echo htmlspecialchars($data['M_bckGrad2']);?>"/>
            </span>
			<span class="relative">
                <label>Arrow</label>
                <input type="text" class="inputbox" name="M_arrow" value="<?php echo htmlspecialchars($data['M_arrow']);?>"/>
            </span>
			
			<div class="separator"></div>
			<span class="relative">
                <label>Bottom shadow</label>
                <input type="text" class="inputbox" name="BB_shadow" value="<?php echo htmlspecialchars($data['BB_shadow']);?>"/>
            </span>
			<span class="relative">
				<label>Background</label>
				<input type="radio" name="BB_bg" id="BB_bg_img" style="float:left" checked onchange="change_bg('BB');">
				<label for="BB_bg_img" style="width:inherit">Image</label>
				<input type="radio" name="BB_bg" id="BB_bg_col" style="float:left" onchange="change_bg('BB');">
				<label for="BB_bg_col" style="width:inherit">Color</label>
				<input type="radio" name="BB_bg" id="BB_bg_gra" style="float:left" onchange="change_bg('BB');">
				<label for="BB_bg_gra" style="width:inherit">Gradient</label>
			</span>
			<span class="relative" id="BB_bgImg">
                <label>Background image</label>
                <input type="text" class="inputbox" name="BB_bckImg" value="<?php echo htmlspecialchars($data['BB_bckImg']);?>"/>
            </span>
            <span class="relative" id="BB_bgCol" style="display:none">
                <label>Background color</label>
                <input type="text" class="inputbox" name="BB_bckCol" value="<?php echo htmlspecialchars($data['BB_bckCol']);?>"/>
            </span>
            <span class="relative" id="BB_bgGra1" style="display:none">
                <label>Gradient color 1</label>
                <input type="text" class="inputbox" name="BB_bckGrad1" value="<?php echo htmlspecialchars($data['BB_bckGrad1']);?>"/>
            </span>
            <span class="relative" id="BB_bgGra2" style="display:none">
                <label>Gradient color 2</label>
                <input type="text" class="inputbox" name="BB_bckGrad2" value="<?php echo htmlspecialchars($data['BB_bckGrad2']);?>"/>
            </span>
			<span class="relative">
                <label>Refresh button image</label>
                <input type="text" class="inputbox" name="BB_RefButImg" value="<?php echo htmlspecialchars($data['BB_RefButImg']);?>"/>
            </span>
			<span class="relative">
                <label>Download button image</label>
                <input type="text" class="inputbox" name="BB_dlButImg" value="<?php echo htmlspecialchars($data['BB_dlButImg']);?>"/>
            </span>
			<span class="relative">
                <label>Info button image</label>
                <input type="text" class="inputbox" name="BB_InfoButImg" value="<?php echo htmlspecialchars($data['BB_InfoButImg']);?>"/>
            </span>
			<span class="relative">
                <label>Refresh button color</label>
                <input type="text" class="inputbox" name="BB_RefButCol" value="<?php echo htmlspecialchars($data['BB_RefButCol']);?>"/>
            </span>
			<span class="relative">
                <label>Download button color</label>
                <input type="text" class="inputbox" name="BB_dlButCol" value="<?php echo htmlspecialchars($data['BB_dlButCol']);?>"/>
            </span>
			<span class="relative">
                <label>Info button color</label>
                <input type="text" class="inputbox" name="BB_InfoButCol" value="<?php echo htmlspecialchars($data['BB_InfoButCol']);?>"/>
            </span>
            

            <span>
                <label>&nbsp;</label>
                <input type="submit" name="ok" value="Save" class="button">
            </span>
        </div>
    </form>
</div>